import request from '@/utils/request'
import qs from 'qs'
const Host = process.env.VUE_APP_BASE_URL
export function login(data) {
  return request({
    url: Host + '/TeacherBasicInfoBLL/login',
    method: 'post',
    data: qs.stringify({ data: JSON.stringify(data) })
  })
}

export function getInfo(token) {
  return request({
    url: Host + '/TeacherBasicInfoBLL/getInfo',
    method: 'post',
    params: qs.stringify(token)
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

export function list() {
  return request({
    url: Host + '/TeacherBasicInfoBLL/selectAll',
    method: 'post'
  })
}

export function update(params) {
  return request({
    url: Host + '/TeacherBasicInfoBLL/changeStatus', // 'https://mobile-ms.uat.homecreditcfc.cn/mock/615a706b646d610027844050/tice/user/update',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify({ data: JSON.stringify(params) })
  })
}
export function add(params) {
  return request({
    url: Host + '/TeacherBasicInfoBLL/add', // 'https://mobile-ms.uat.homecreditcfc.cn/mock/615a706b646d610027844050/tice/user/update',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify({ data: JSON.stringify(params) })
  })
}
